#ifndef MSIGMP_H
#define MSIGMP_H
#ifdef __cplusplus
   extern "C"{
#endif
#include <libmscommon/msmd.h>
#include "msprotocol.h" 

#define igmp_max_num	300
typedef struct IGMPLISTContext{
	ms_byte pmaddr[128];
	ms_byte dest_mac[128];
	ms_s32 index_interface;
	ms_s32 num_report;

	ms_bool flag_include;
	ms_u16 num_src;
	ms_byte source_addr[20][128];

	ms_bool flag_pppoe;
	ms_bool flag_getInfo;
}IGMPLISTContext;

typedef struct NETContext{
	URLProtocol *pffurl_raw;
	ms_s32   num;
	NETCFGInfo netcfg_info[msnet_maxnum_iface];
	URLContext rtpraw_urlctt[msnet_maxnum_iface];
}NETContext;
typedef struct IGMPContext{
	MSLOCKContext mslock_ctt;
	IGMPLISTContext igmplist_ctt[igmp_max_num];
	NETContext net_ctt;
	ms_u08 igmp_ver;
	ms_u32 igmp_report_time;
	ms_bool flag_stop;
	ms_bool igmp_enable_manual;

	MSTHREADContext msthread_ctt;
}IGMPContext;
#ifndef MSIGMP_C
extern ms_s08 
	igmp_api_joinGroupSources(URLContext *s,ms_bool is_include);
extern int 
	igmp_api_join(URLContext *s);
extern int 
	igmp_api_leave(URLContext *s);
extern ms_s32 
	igmp_api_getVersion(ms_void);
extern ms_bool 
	igmp_api_init(ms_bool igmp_enable_manual,ms_u08 igmp_ver,ms_u32 igmp_report_timems);
extern ms_bool 
	igmp_api_deinit(ms_void);
#endif

#ifdef __cplusplus
}
#endif
#endif